<?php
require_once('soap/nusoap.php'); 
$wsdl="http://203.113.137.176:80/mt-services/MTService?WSDL"; 
//$wsdl="http://localhost/vfun/server.php?wsdl";
		
	 	$client=new nusoap_client($wsdl, array('wsdl'));  
			$param=array('userId' => '84902171891',  
		    		'serviceId' => '6246',  
		    		'commandCode'=> 'FIM', 
		    		'info'=> base64_encode('phamios'),   
		    		'messageType'=> '1', 
		    		'contentType'=> '1',
					'sRequestId'=>"877");
		$client->setCredentials('store8x', 'store847jdhhgsldjfg38x'); 
		$result = $client->call('sendMTPhp', $param);

 
		if ($client->fault) {
		    echo '<h2>Fault</h2><pre>';
		    print_r($result);
		    echo '</pre>';
		} else {
			// Check for errors
		    $err = $client->getError();
		    if ($err) {
		        // Display the error
		        echo '<h2>Error</h2><pre>' . $err . '</pre>';
		    } else {
		        // Display the result
		        echo '<h2>Result</h2><pre>';
		        print_r($result);
		    echo '</pre>';
		    }
		}
		
		// Display the request and response
		echo '<h2>Request</h2>';
		echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
		echo '<h2>Response</h2>';
		echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
		// Display the debug messages
		echo '<h2>Debug</h2>';
		echo '<pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
 
?>
